3.1.53 \(\int \frac {\csc (c+d x)}{(a-a \sin ^2(c+d x))^2} \, dx\) [53]

Optimal. Leaf size=47 \[ -\frac {\tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac {\sec (c+d x)}{a^2 d}+\frac {\sec ^3(c+d x)}{3 a^2 d} \]

[Out]

-arctanh(cos(d*x+c))/a^2/d+sec(d*x+c)/a^2/d+1/3*sec(d*x+c)^3/a^2/d

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3254, 2702, 308, 213} \begin {gather*} \frac {\sec ^3(c+d x)}{3 a^2 d}+\frac {\sec (c+d x)}{a^2 d}-\frac {\tanh ^{-1}(\cos (c+d x))}{a^2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]/(a - a*Sin[c + d*x]^2)^2,x]

[Out]

-(ArcTanh[Cos[c + d*x]]/(a^2*d)) + Sec[c + d*x]/(a^2*d) + Sec[c + d*x]^3/(3*a^2*d)

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 308

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 2702

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 3254

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\csc (c+d x)}{\left (a-a \sin ^2(c+d x)\right )^2} \, dx &=\frac {\int \csc (c+d x) \sec ^4(c+d x) \, dx}{a^2}\\ &=\frac {\text {Subst}\left (\int \frac {x^4}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=\frac {\text {Subst}\left (\int \left (1+x^2+\frac {1}{-1+x^2}\right ) \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=\frac {\sec (c+d x)}{a^2 d}+\frac {\sec ^3(c+d x)}{3 a^2 d}+\frac {\text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=-\frac {\tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac {\sec (c+d x)}{a^2 d}+\frac {\sec ^3(c+d x)}{3 a^2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 61, normalized size = 1.30 \begin {gather*} \frac {-\frac {\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {\sec (c+d x)}{d}+\frac {\sec ^3(c+d x)}{3 d}}{a^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]/(a - a*Sin[c + d*x]^2)^2,x]

[Out]

(-(Log[Cos[(c + d*x)/2]]/d) + Log[Sin[(c + d*x)/2]]/d + Sec[c + d*x]/d + Sec[c + d*x]^3/(3*d))/a^2

________________________________________________________________________________________

Maple [A]
time = 0.25, size = 49, normalized size = 1.04

method result size
derivativedivides \(\frac {\frac {\ln \left (\cos \left (d x +c \right )-1\right )}{2}-\frac {\ln \left (1+\cos \left (d x +c \right )\right )}{2}+\frac {1}{3 \cos \left (d x +c \right )^{3}}+\frac {1}{\cos \left (d x +c \right )}}{d \,a^{2}}\) \(49\)
default \(\frac {\frac {\ln \left (\cos \left (d x +c \right )-1\right )}{2}-\frac {\ln \left (1+\cos \left (d x +c \right )\right )}{2}+\frac {1}{3 \cos \left (d x +c \right )^{3}}+\frac {1}{\cos \left (d x +c \right )}}{d \,a^{2}}\) \(49\)
norman \(\frac {\frac {4 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {8}{3 a d}-\frac {4 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}}{a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}\) \(85\)
risch \(\frac {2 \,{\mathrm e}^{5 i \left (d x +c \right )}+\frac {20 \,{\mathrm e}^{3 i \left (d x +c \right )}}{3}+2 \,{\mathrm e}^{i \left (d x +c \right )}}{d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{a^{2} d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{a^{2} d}\) \(96\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)/(a-a*sin(d*x+c)^2)^2,x,method=_RETURNVERBOSE)

[Out]

1/d/a^2*(1/2*ln(cos(d*x+c)-1)-1/2*ln(1+cos(d*x+c))+1/3/cos(d*x+c)^3+1/cos(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 59, normalized size = 1.26 \begin {gather*} -\frac {\frac {3 \, \log \left (\cos \left (d x + c\right ) + 1\right )}{a^{2}} - \frac {3 \, \log \left (\cos \left (d x + c\right ) - 1\right )}{a^{2}} - \frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{2} + 1\right )}}{a^{2} \cos \left (d x + c\right )^{3}}}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)^2)^2,x, algorithm="maxima")

[Out]

-1/6*(3*log(cos(d*x + c) + 1)/a^2 - 3*log(cos(d*x + c) - 1)/a^2 - 2*(3*cos(d*x + c)^2 + 1)/(a^2*cos(d*x + c)^3
))/d

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 70, normalized size = 1.49 \begin {gather*} -\frac {3 \, \cos \left (d x + c\right )^{3} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 3 \, \cos \left (d x + c\right )^{3} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 6 \, \cos \left (d x + c\right )^{2} - 2}{6 \, a^{2} d \cos \left (d x + c\right )^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

-1/6*(3*cos(d*x + c)^3*log(1/2*cos(d*x + c) + 1/2) - 3*cos(d*x + c)^3*log(-1/2*cos(d*x + c) + 1/2) - 6*cos(d*x
 + c)^2 - 2)/(a^2*d*cos(d*x + c)^3)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\csc {\left (c + d x \right )}}{\sin ^{4}{\left (c + d x \right )} - 2 \sin ^{2}{\left (c + d x \right )} + 1}\, dx}{a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)**2)**2,x)

[Out]

Integral(csc(c + d*x)/(sin(c + d*x)**4 - 2*sin(c + d*x)**2 + 1), x)/a**2

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 107 vs. \(2 (45) = 90\).
time = 0.43, size = 107, normalized size = 2.28 \begin {gather*} \frac {\frac {3 \, \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a^{2}} + \frac {8 \, {\left (\frac {3 \, {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {3 \, {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + 2\right )}}{a^{2} {\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1\right )}^{3}}}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)^2)^2,x, algorithm="giac")

[Out]

1/6*(3*log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1))/a^2 + 8*(3*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 3*
(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2 + 2)/(a^2*((cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 1)^3))/d

________________________________________________________________________________________

Mupad [B]
time = 0.09, size = 41, normalized size = 0.87 \begin {gather*} \frac {{\cos \left (c+d\,x\right )}^2+\frac {1}{3}}{a^2\,d\,{\cos \left (c+d\,x\right )}^3}-\frac {\mathrm {atanh}\left (\cos \left (c+d\,x\right )\right )}{a^2\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(c + d*x)*(a - a*sin(c + d*x)^2)^2),x)

[Out]

(cos(c + d*x)^2 + 1/3)/(a^2*d*cos(c + d*x)^3) - atanh(cos(c + d*x))/(a^2*d)

________________________________________________________________________________________